home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14519 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Trouble Reading Binary Data from MicroVAX III
  5. Date: 15 Apr 1996 07:41:13 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4ktn69INNohu@keats.ugrad.cs.ubc.ca>
  8. References: <4kh8d8$kjc@newshound.csrv.uidaho.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4kh8d8$kjc@newshound.csrv.uidaho.edu>,
  12. Ron Patterson <patt9451@uidaho.edu> wrote:
  13.  >Hello all,
  14.  >
  15.  >I am having trouble reading binary data that was created with a MicroVAX III
  16.  >workstation.  I am able to read int's, and char's o.k. but the majority of
  17.  >the data is a large number of floating point values.  fread() returns the 
  18.  >correct number of floating point numbers read but the data is a mess of zeros 
  19.  >and extremely large or small numbers.  Is this a big endian/little endian 
  20.  >problem (my program is being compiled and run on a PC with a 32 bit C compiler) 
  21.  >or bit ordering problem?  I know the size of a float on both systems is the
  22.  >same (4 bytes).  Any help would be great!
  23.  
  24. The Vax doesn't use IEEE floating point representation, as far as I remember. I
  25. don't have references off-hand that would tell me what that representation is,
  26. but all I can say is: be prepared to do some bit twiddling to recover the
  27. values.
  28.  
  29. One of the textbooks by William Stallings, or just about any general text on
  30. computer architectures, should have a description.
  31. -- 
  32. I'm not really a jerk, but I play one on Usenet.
  33.